//
// Created on 2025/7/21.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#ifndef AVCODECVIDEO_UTILS_H
#define AVCODECVIDEO_UTILS_H

#include <string>

#undef LOG_DOMAIN
#undef LOG_TAG
#define LOG_DOMAIN 0x1234
#define LOG_TAG "veditor"

#include "hilog/log.h"

#define LOGI(fmt, ...)                                                                                                 \
    do {                                                                                                               \
       OH_LOG_INFO(LOG_APP, "[%{public}s:%{public}d] [%{public}s] " fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__ );\
    } while (0)

#define LOGE(fmt, ...)                                                                                                 \
    do {                                                                                                               \
       OH_LOG_ERROR(LOG_APP, "[%{public}s:%{public}d] [%{public}s] " fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__ );\
    } while (0)

#define LOGD(fmt, ...)                                                                                                 \
    do {                                                                                                               \
       OH_LOG_DEBUG(LOG_APP, "[%{public}s:%{public}d] [%{public}s] " fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__ );\
    } while (0)

class OH_AVFormat;

enum VEditorStatus {
    STATUS_OK = 0,
    STATUS_ERROR = 1
};

std::string GenerateUniqueId();
std::string GenerateUniqueId(const std::string& tag);
std::string UriToPath(const std::string& fileUri);
std::string PathToUri(const std::string& path);
#endif //AVCODECVIDEO_UTILS_H
